package com.gome.ss.webserver.servlet.api;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.gome.ss.flowcrawl.plugin.FlowCrawlManager;

public class FlowCrawlList extends HttpServlet {

	/* /spiderkit/flowcrawl_info */
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		String pagenoString = req.getParameter("pageno");
		String perpageString = req.getParameter("perpage");
		
		resp.setContentType("text/html;charset=gbk");
		req.setCharacterEncoding("gbk");
		
		resp.getWriter().print(FlowCrawlManager.list(pagenoString, perpageString));
		resp.getWriter().close();
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		this.doGet(req, resp);
	}

}
